package com.huadi.bili_hot.controller;

import com.huadi.bili_hot.entity.Hello;
import com.huadi.bili_hot.service.HelloService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller
public class HelloController {

    @Autowired
    private HelloService helloService;

    @RequestMapping("/hello")
    public String getIndex() {
        return "hello";
    }

    @RequestMapping("/show_example")
    @ResponseBody
    public String getHelloList() {
        String info = helloService.getHellos();
        return info;
    }
}
